import { BasicFetchResult, SaaSBasicPageParams } from '/@/api/model/baseModel';

// SaaS Landing
export type SaaSTenantParams = {
  tenantName?: string;
};

// SaaS Landing 企业管理请求参数
export type SaaSTenantPageParams = SaaSTenantParams & SaaSBasicPageParams;

// SaaS Landing 企业管理返回数据
export interface SaaSTenantListItem {
  oneaccessTenantId: string;
  name: string;
  code: string;
  status: number;
  phone: string;
  isBuiltIn: boolean;
  instanceId: string;
  instanceType: string;
  duration: string;
  appId: string;
  appName: string;
  total: number;
}

// SaaS Landing 删除企业
export type SaaSDelTenantParams = {
  id: string;
};

export type TenantPageDto = {
  registeredTenantName: string; // 企业名称
};

// 企业管理请求参数
export type TenantParams = { model: TenantPageDto } & SaaSBasicPageParams;

// 企业管理返回数据
export interface TenantListItem {
  oneaccessTenantId: string;
  name: string;
  code: number;
  status: number;
  phone: string;
  isBuiltIn: number;
  category?: string; //套餐类型
  expirationDate?: string; //有效期
  joinTime?: string; //加入时间
}

export type TenantListGetResultModel = BasicFetchResult<TenantListItem>;

//企业管理部分
export interface EnterpriseListItem {
  enterpriseName: string; //企业名称
  enterpriseId: number; //企业编码
  leader: string; //责任人
  mobilePhone: string; //上次修改时间
  category: string; //套餐类型
  expirationDate: string; //有效期
  inner: string; //内置
  joinTime: string; //加入时间
}
export type EnterpriseListGetResultModel = BasicFetchResult<EnterpriseListItem>;
